<?php

Yii::import('zii.widgets.CPortlet');

class UserMenu extends CPortlet
{
    public function init()
    {
        /*$this->title = sprintf('%s <br /> %s: %s',
                               Yum::t('Usermenu'),
                               Yum::t('Logged in as'),
                               Yii::app()->user->data()->username);*/

        $this->contentCssClass = 'menucontent';
        return parent::init();
    }

    public function run()
    {
        $this->widget('YumMenu', array(
                                      'items' => $this->getMenuItems()
                                 ));

        parent::run();
    }

    public function getMenuItems()
    {
        return array(
            array('label' => 'Create New Post', 'url' => array('//blog/post/create')),
            array('label' => 'Manage Posts', 'url' => array('//blog/post/admin')),
            array('label' => 'Approve Comments', 'url' => array('//blog/comment/index')),
        );
        /*        return array('label' => 'Profile',
                            'items' => array(
                                    array('label' => 'Create New Post', 'url' => array('//blog/post/create')),
                                    array('label' => 'Manage Posts', 'url' => array('//blog/post/admin')),
                                    array('label' => 'Approve Comments','url' => array('//blog/comment/index')),
                                    )
                            );
        */
    }
}